package com.my.velocity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.my.util.VeloctiyTemplateUtil;

public class VelocityDemo {
	private static final String fileName="com/my/templates/velocity_test.vm";
	public static void main(String[] args) {
		Map<String, Object> values=new HashMap<String, Object>();
		
		List<String> list=new ArrayList<String>();
		list.add("a");
		list.add("b");
		
		Set<String> set=new HashSet<String>();
		set.add("c");
		set.add("d");
		
		Map<String, String> map=new HashMap<String, String>();
		map.put("a", "b");
		map.put("c", "d");
		
		
		values.put("list", list);
		values.put("set", set);
		values.put("map", map);
		
		
		String content=VeloctiyTemplateUtil.getContent(fileName, values);
		System.out.println(content);
	}
}
